document.getElementById("number").focus()
$("#unit").val(getQ().unit)
document.getElementById("save").onclick=function(){
	var data={
		"number":$("#number").val(),
		"name":$("#name").val(),
		"username":getQ().username,
	}
	if(/^ *$/.test(data.number)){
		showErrorInfo("请填写车牌号！")
		return false;
	}
	data=JSON.stringify(data)
	$.ajax({
		"url":"/vehicle/",
		"type":getQ().type,
		"data":{"data":data},
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"error":errorAjax,
		"success":function(data){
			if(responseCheck(data)){
				alert("操作成功！")
				window.opener.location.reload()
				window.close()
			}
		}
	})
	
}
